import 'package:flutter/material.dart';

///**
///* @author hrongyong
///* @date   2/24/21
///* @email hrongyong@gmail.com
///* Description: 圆点折线图
///*/
class DotLineChartModel {
  ///标题
  String name;

  ///第一个点
  double firstPoint;

  ///第一个点的描述
  String firstDescription;

  ///第二个点
  double secondPoint;

  ///第二个点的描述
  String secondDescription;

  DotLineChartModel({@required this.name, this.firstPoint, this.firstDescription, this.secondPoint, this.secondDescription}) {
    if (firstPoint != null) {
      if (firstPoint > 1.0) {
        firstPoint = 1.0;
      }
      if (firstPoint < 0.0) {
        firstPoint = 0.0;
      }
    }

    if (secondPoint != null) {
      if (secondPoint > 1.0) {
        secondPoint = 1.0;
      }
      if (secondPoint < 0.0) {
        secondPoint = 0.0;
      }
    }
  }
}
